import java.util.Random;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: a1227
 * Date: 2022-07-10
 * Time: 17:59
 */
public class Game {
    public static void main(String[] args) {
        Random random = new Random();
        int num = random.nextInt(50)+50;//随机数范围[50-100)
        System.out.println(num);
        while(true){
            System.out.print("请输入:");
            Scanner scanner = new Scanner(System.in);
            int num1 = scanner.nextInt();
            if(num1>num){
                System.out.println("猜大了");
            }
            else if(num1==num){
                System.out.println("猜对了");
                break;
            }
            else{
                System.out.println("猜小了");
            }
        }
    }
}
